/* author: sailing date: 2018/11/7 func: **/

<template>
	<div class="login-page">
		<mu-dialog title="提示" width="360" :open.sync="openSimple">
		    请选择右上角按钮浏览器打开
		</mu-dialog>
	</div>
</template>

<script type="text/javascript">
import tools from "../server/tools"
export default {
	data() {
		return {
			openSimple:false
		};
	},

	mounted() {		
		if (tools.isWeixin()) {
			this.openSimple = true
		}else {
			this.$router.push('/Main')
		}
	},

	methods: {
		closeSimpleDialog(){
			this.openSimple = false
		},
		openSimpleDialog() {
			if (!this.un.username) {
				this.$toast.success("请输入病号");
				return;
			}
			if (!this.un.tel) {
				this.$toast.success("请输入电话号码");
				return;
			}
			if (!this.un.password) {
				this.$toast.success("请输入密码");
				return;
			}
			if (!this.un.email) {
				this.$toast.success("请输入邮箱");
				return;
			}

			Storage.set("user", this.un);
			this.$router.push('/')
			console.log("Storage.set:", Storage.get("user"));
		}
	},

	components: {}
};
</script>

<style lang="less">
.login-page {
	.container {
		margin-top: 15px;
		text-align: center;
	}
	.loginHeader {
		height: 50px;
		margin-top: 20px;
		line-height: 50px;
		font-size: 25px;
	}
}
</style>
